//
// CPSSound.java
// Copyright (C) 2010  "Naush" <naush _ hotmail _ fr>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>./* ----------------------------------------------------------------------------







package org.ryzom.nel.threed;

import org.ryzom.nel.misc.IStream;

public class CPSSound extends CPSLocatedBindable {
  private long swigCPtr;

  public CPSSound(long cPtr, boolean cMemoryOwn) {
    super(nel3dJNI.CPSSound_SWIGUpcast(cPtr), cMemoryOwn);
    swigCPtr = cPtr;
  }

  public static long getCPtr(CPSSound obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        nel3dJNI.delete_CPSSound(swigCPtr);
      }
      swigCPtr = 0;
    }
    super.delete();
  }

  public CPSSound() {
    this(nel3dJNI.new_CPSSound(), true);
  }

  public void serial(IStream f) {
    nel3dJNI.CPSSound_serial(swigCPtr, this, IStream.getCPtr(f), f);
  }

  public long getType() {
    return nel3dJNI.CPSSound_getType(swigCPtr, this);
  }

  public long getPriority() {
    return nel3dJNI.CPSSound_getPriority(swigCPtr, this);
  }

  public void step(TPSProcessPass pass) {
    nel3dJNI.CPSSound_step(swigCPtr, this, pass.swigValue());
  }

  public void setSoundName(SWIGTYPE_p_NLMISC__TStringId soundName) {
    nel3dJNI.CPSSound_setSoundName(swigCPtr, this, SWIGTYPE_p_NLMISC__TStringId.getCPtr(soundName));
  }

  public SWIGTYPE_p_NLMISC__TStringId getSoundName() {
    return new SWIGTYPE_p_NLMISC__TStringId(nel3dJNI.CPSSound_getSoundName(swigCPtr, this), false);
  }

  public void setGain(float gain) {
    nel3dJNI.CPSSound_setGain(swigCPtr, this, gain);
  }

  public float getGain() {
    return nel3dJNI.CPSSound_getGain(swigCPtr, this);
  }

  public void setGainScheme(SWIGTYPE_p_NL3D__CPSAttribMakerT_float_t gain) {
    nel3dJNI.CPSSound_setGainScheme(swigCPtr, this, SWIGTYPE_p_NL3D__CPSAttribMakerT_float_t.getCPtr(gain));
  }

  public SWIGTYPE_p_NL3D__CPSAttribMakerT_float_t getGainScheme() {
    long cPtr = nel3dJNI.CPSSound_getGainScheme__SWIG_0(swigCPtr, this);
    return (cPtr == 0) ? null : new SWIGTYPE_p_NL3D__CPSAttribMakerT_float_t(cPtr, false);
  }

  public void setPitch(float pitch) {
    nel3dJNI.CPSSound_setPitch(swigCPtr, this, pitch);
  }

  public float getPitch() {
    return nel3dJNI.CPSSound_getPitch(swigCPtr, this);
  }

  public void setPitchScheme(SWIGTYPE_p_NL3D__CPSAttribMakerT_float_t pitch) {
    nel3dJNI.CPSSound_setPitchScheme(swigCPtr, this, SWIGTYPE_p_NL3D__CPSAttribMakerT_float_t.getCPtr(pitch));
  }

  public SWIGTYPE_p_NL3D__CPSAttribMakerT_float_t getPitchScheme() {
    long cPtr = nel3dJNI.CPSSound_getPitchScheme__SWIG_0(swigCPtr, this);
    return (cPtr == 0) ? null : new SWIGTYPE_p_NL3D__CPSAttribMakerT_float_t(cPtr, false);
  }

  public void setEmissionPercent(float percent) {
    nel3dJNI.CPSSound_setEmissionPercent(swigCPtr, this, percent);
  }

  public float getEmissionPercent() {
    return nel3dJNI.CPSSound_getEmissionPercent(swigCPtr, this);
  }

  public void setSpawn(boolean enabled) {
    nel3dJNI.CPSSound_setSpawn__SWIG_0(swigCPtr, this, enabled);
  }

  public void setSpawn() {
    nel3dJNI.CPSSound_setSpawn__SWIG_1(swigCPtr, this);
  }

  public boolean getSpawn() {
    return nel3dJNI.CPSSound_getSpawn(swigCPtr, this);
  }

  public void setMute(boolean enabled) {
    nel3dJNI.CPSSound_setMute__SWIG_0(swigCPtr, this, enabled);
  }

  public void setMute() {
    nel3dJNI.CPSSound_setMute__SWIG_1(swigCPtr, this);
  }

  public boolean getMute() {
    return nel3dJNI.CPSSound_getMute(swigCPtr, this);
  }

  public void stopSound() {
    nel3dJNI.CPSSound_stopSound(swigCPtr, this);
  }

  public void reactivateSound() {
    nel3dJNI.CPSSound_reactivateSound(swigCPtr, this);
  }

  public void setUseOriginalPitchFlag(boolean useOriginalPitch) {
    nel3dJNI.CPSSound_setUseOriginalPitchFlag(swigCPtr, this, useOriginalPitch);
  }

  public boolean getUseOriginalPitchFlag() {
    return nel3dJNI.CPSSound_getUseOriginalPitchFlag(swigCPtr, this);
  }

}
